As the abilities of computers expand into entertainment genres that once required separate electronic components, increased efficiency and user-friendliness is desirable. One solution is Microsoft's® DirectShow®, which provides playback of multimedia streams from local files or Internet servers, capture of multimedia streams from devices, and format conversion of multimedia streams. DirectShow® enables playback of video and audio content of file types such as Windows Media Audio (WMA), Windows Media Video (WMV), Moving Pictures Experts Group (MPEG), Apple® QuickTime®, Audio-Video Interleaved (AVI), and Waveform Audio File (WAV). DirectShow® includes a system of pluggable filter components. Filters are objects that support DirectShow® interfaces and can operate on streams of data by reading, copying, modifying and writing data to a file. The basic types of filters include a source filter, which takes the data from some source, such as a file on disk, a satellite feed, an Internet server, or a Video Cassette Recorder (VCR), and introduces it into the filter graph which is a connection of filters. The filter graph provides transform filter, which converts the format of the data, a sync and source filter which receives data and transmits the data; and a rendering filter, which renders the data, such as rendering the data to a display device. The data could also be rendered to any location that accepts media. Other types of filters included in DirectShow® include effect filters, which add effects without changing the data type, and parser filters, which understand the format of the source data and know how to read the correct bytes, create times stamps, and perform seeks.
Therefore, all data passes from filter to filter along with a good deal of control information. When filters are connected using the pins, a filter graph is created. To control the data flow and connections in a filter graph, DirectShow® includes a filter graph manager. The filter graph manager assists in assuring that filters are connected in the proper order, but the data and much of the control do not pass through the filter graph manager. Filters must be linked appropriately. For example, the filter graph manager must search for a rendering configuration, determine the types of filters available, link the filters in the appropriate order for a given data type and provide an appropriate rendering filter.
White filters allowed a great deal of reuse of programs, the use of filters also created some unanticipated problems. One of the problems created by filters is the large number of Application Programming Interfaces (API's) for the filters which came into being. Each filter essentially has a separate API. Therefore, a given filter must be capable of interfacing to the API for every filter to which it might attach. Also, the use of filters creates the problem of shutting donna given filter problematic. When a given filter in a graph is shut down, any filter that interfaces with the shut down filter requires a different associated interface. In general, programming a filter to gracefully handle the toss of an interface is difficult, as the state of the filter can be unknown when the interface is lost. The loss of interfaces, therefore, tends to lead to unpredicted behavior in the filters and ultimately to ill behaved programs. Further, the overall control in DirectShow® is distributed between two blocks. The interface between the filters controls the data flow while the filter manager controls the instantiation and removal of filters. Distributing the control in this manner makes software design cumbersome as there are inevitably some control functions which cross the boundary between the blocks. Another problem with DirectShow is that the filters shoulder the responsibility of media format negotiation and buffer management functionality. Filters communicate with other filters to accomplish this task. The dependency on filters causes applications building on DirectShow susceptible to bugs and inefficiencies that could be programmed into a filter. Thus, a badly written filter could easily bring down the filter graph and an application associated with the filter graph.
There is a need to address the problems with the DirectShow® architecture. More particularly, there is a need to improve control of processing of multimedia data and address the dependency on filters for communications among multimedia components.